#include "stm32f4xx.h"
#include "nvicconfig.h"


void IIC_Init_1(void);        //初始化IIC的IO口
void IIC_Start_1(void);			  //发送IIC开始信号
void IIC_Stop_1(void);	  	  //发送IIC停止信号
void IIC_Ack_1(void);					//IIC发送ACK信号
void IIC_NAck_1(void);				//IIC不发送ACK信号
uint8_t IIC_WaitAck_1(void); 		 //IIC等待ACK信号
void IIC_SendByte_1(uint8_t data);  //IIC发送一个字节
uint8_t IIC_ReadByte_1(uint8_t ack);//IIC读取一个字节

uint8_t IIC_ReadByteFromSlave_1(uint8_t I2C_Addr,uint8_t reg,uint8_t *buf);
uint8_t IIC_ReadMultByteFromSlave_1(uint8_t dev, uint8_t reg, uint8_t length, uint8_t *data);
uint8_t IIC_WriteByteToSlave_1(uint8_t I2C_Addr,uint8_t reg,uint8_t buf);
uint8_t IIC_WriteMultByteToSlave_1(uint8_t dev, uint8_t reg, uint8_t length, uint8_t* data);






